home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / comm / mail / ftpget10.lha / FTPGet.daftp next >
Text File  |  1995-08-31  |  869b  |  50 lines

  1. /*
  2. ** $VER: FTPGet.daftp 1.1 (29.5.95)
  3. **
  4. ** by Eirik Nicolai Synnes
  5. **
  6. ** Please read the comment in the beginning of FTPGet.thor for info on this
  7. ** script.
  8. **
  9. **
  10. */
  11.  
  12. /* Edit these variables: */
  13.  
  14. listfile = "Thor:GetFiles.txt" /* This must be the same in FTPGet.thor and FTPGet.daftp */
  15. remotehome = "/pub/aminet/"     /* Set this to the remote AmiNet directory */
  16.  
  17. /* End */
  18.  
  19. i = 0
  20.  
  21. if exists(listfile) then do
  22.     call open(filelist, listfile, 'R')
  23.     do until eof(filelist)
  24.         i = i + 1
  25.         files.i = readln(filelist)
  26.         end
  27.     call close(filelist)
  28.     end
  29. else do
  30.     say 'Couldn''t find filelist ('listfile')'
  31.     exit(0)
  32.     end
  33.  
  34. address("daftp")
  35.  
  36. CD NOSCAN '"'remotehome'"'
  37. if rc ~= 0 then do
  38.     say 'Remote CD to 'remotehome' failed.'
  39.     exit(0)
  40.     end
  41.  
  42.  
  43. do j = 1 to i
  44.     if files.j ~= "" then do
  45.         MGET BIN files.j
  46.         say result
  47.         if rc ~= 0 then say 'MGET of 'files.j' failed.'
  48.         end
  49.     end
  50.